package cn.tedu.charging.order.feign;

import cn.tedu.charging.common.protocol.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 专属于调用设备服务的feign接口
 */
@FeignClient(value = "charging-device")
public interface DeviceClient {
    //1.检查枪状态
    @GetMapping("/device/gun/check")
    public JsonResult<Boolean> checkGun(@RequestParam("gunId") Integer gunId);

    @PostMapping("/device/gun/status")
    public JsonResult<Boolean> updateGunStatus(
            @RequestParam("gunId")Integer gunId,
            @RequestParam("status")Integer status);
}
